<template>
  <scroll-view class="Bdivider" scroll-x="true">
    <view class="Bdivider_list" v-for="item, indexs in 10" @click="onTab(item, indexs)" :key="indexs"
      :class="[indexs === index && 'Bdivider_list_actvie']">
      <view class="Bdivider_list_img">
        <u-image src="https://img1.baidu.com/it/u=347034249,179256317&fm=253&fmt=auto&app=120&f=JPEG?w=1422&h=800"
          radius="50%" :lazy-load="true" width="64rpx" height="64rpx"></u-image>
      </view>
      <text> 全部{{ item }}</text>
    </view>
  </scroll-view>
</template>
<script setup lang="ts">
/** 官方的组件有bug只能自己写了
 * 
 */
import { ref } from 'vue';
const index = ref<number>(1)
function onTab(item, indexs) {
  console.log(item, indexs)
  index.value = indexs
}
</script>
<style lang="scss" scoped>
@import './index.scss'
</style>